%option noyywrap
%{
#include<stdio.h>
#include<iostream>
#include<string>
#include<map>
#include<set>
using namespace std;
set<string> table;
long int studentnumber=201492287;
char* name="ZXZ";
long long int number=0;
int sum1=0;
int sum2=0;
%}
digit [0-9]
number {digit}{9}
sum {digit}+(\.{digit}+)?
name NAME$

%%
^{number}    {printf("201492287");}
{name}  {printf("%s",name);}
{sum} {sum1++;table.insert(yytext); number=(long long int)(atof(yytext)*2+0.5)+studentnumber; cout<<number;}

%%

int main()
{
yylex();
sum2=table.size();
cout<<"出现次数"<<sum1<<endl;
cout<<"去重之后"<<sum2<<endl;
return 0;
}
